import api from "@/utils";
import { AxiosResponse } from "axios";
import { ElMessage } from "element-plus/es";

// 单据数据数据获取
export class ReceiptService {
  async getReceiptRecord(url: string, searchData?: Record<string, unknown>) {
    await api.http
      .postJson(url, searchData)
      .then((res: AxiosResponse) => {
        return res.data;
      })
      .catch((err) => {
        console.log(err);
        ElMessage.error("系统错误,请联系管理员!");
        return err;
      });
  }
}
